/**
 * @param {*} el 
 */
function showPic() {
    let placeholder = document.createElement("img");
    placeholder.setAttribute("id","placeholder");
    placeholder.setAttribute("src","image/a.jpeg");
    placeholder.setAttribute("alt","it's a image");

    let description = document.createElement("p")
    description.setAttribute("id","description");
    var destxt = document.createTextNode("Choose a image")
    description.appendChild(destxt);
    let body = document.getElementsByTagName("body");
    // body[0].appendChild(placeholder);
    // body[0].appendChild(description)
    let gallery = document.getElementById("gallery")
    // gallery.parentNode.insertBefore(placeholder,gallery)
    // gallery.parentNode.insertBefore(description,placeholder)
    insertAfter(gallery,placeholder);
    insertAfter(placeholder,description);
};

function insertAfter(cur,target) {
    let parent = cur.parentNode;
    parent.insertBefore(target,cur)
}

// export default {showPic}